import React from 'react'
class LifeCycle extends React.Component {
    constructor() {
        super()
        // 定义好你的状态
    }
    componentDidMount() {
        // 进行DOM操作、接口请求
        const box = document.getElementById('container')
        console.log(box)
        box.style.width = 100 + 'px'
        box.style.height = 100 + 'px'
        box.style.backgroundColor = 'red'
    }
    render() {
        return <div id="container"></div>
    }
}

export default LifeCycle